﻿using ZeroSum.Plugin.Authorization.Datas.Aggregates.RoleAggregate;

namespace ZeroSum.Plugin.Authorization.Datas.Services.Roles;

public interface IRoleBaseDomainService<TRole> where TRole : RoleBase
{
    Task<TRole> AddAsync(TRole entity, CancellationToken cancellationToken = default);
    Task CheckRoleUpdate(string? name, string? code, long id);
    Task UpdateAsync(TRole entity, CancellationToken cancellationToken = default);
    Task DeleteAsync(long id, CancellationToken cancellationToken = default);
    Task<TRole> GetByIdAsync(long id, CancellationToken cancellationToken = default);
}